package com.heima.search.repository;

import com.heima.search.entity.ApAssociateWords;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.List;

/**
 * 操作联想词对应集合中文档 基本CURD操作
 */
public interface ApAssociateWordsRepository extends MongoRepository<ApAssociateWords, String> {


    //需求：根据联想词模糊查询 前三条记录
    public List<ApAssociateWords> findTop3ByAssociateWordsLikeOrderByCreatedTimeDesc(String key);


    public List<ApAssociateWords> findTop5ByAssociateWordsContainsOrderByCreatedTimeDesc(String key);


}
